import { Component, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'nova-tab',
  templateUrl: './tab.component.html',
  styleUrls: ['./tab.component.css']
})
export class TabComponent {
  @Input("label") label = ""
  @Input()
  isShow!: boolean;
  @Output("onToggle") onToggle: EventEmitter<string> = new EventEmitter()
  toggle() {
    this.isShow = !this.isShow
    this.onToggle.emit(this.label)
  }
  close() {
    this.isShow = false
  }
  open() {
    this.isShow = true
  }
}
